package com.genesis.mall.mapper;

import com.genesis.mall.entity.PmsProduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.genesis.mall.entity.PmsProductCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商品信息 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2022-08-01
 */
@Mapper
public interface PmsProductMapper extends BaseMapper<PmsProduct> {

    @Select("SELECT *FROM  pms_product_category GROUP BY parent_id =#{parentId}")
    List<PmsProductCategory> groupByParentId(Long parentId);
}
